package org.nowcoder.huawei.other;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.TreeSet;

/**
 * HJ3: 明明的随机数
 */
public class HJ3 {

    public static void hj3() throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        TreeSet<Integer> set = new TreeSet<>();
        int count = 0;
        String line;
        while ((line = br.readLine()) != null) {
            set.add(Integer.parseInt(line));
            if (++count >= N) {
                break;
            }
        }
        set.stream().forEach(System.out::println);
    }
}
